fixed formatting.
removed debugging leftovers.
fixed formatting plus other minor cosmetic fixes.
many small fixes and cleanups.