significant cleanup of indentation and 80 col adherence