Added lots of constness and assertions to hunt a bug.
Added lots of constness and assertions to hunt a bug.

elidupree/Lasercake,idupree/Lasercake,idupree/Lasercake,idupree/Lasercake,Lasercake/Lasercake,elidupree/Lasercake,idupree/Lasercake,elidupree/Lasercake,Lasercake/Lasercake,Lasercake/Lasercake,Lasercake/Lasercake,idupree/Lasercake,elidupree/Lasercake,Lasercake/Lasercake,elidupree/Lasercake,idupree/Lasercake,elidupree/Lasercake,idupree/Lasercake,elidupree/Lasercake