Small bug fixes, mostly in private variable declaration.