code cleanup, fix ton of whitespace and other formatting issues