Some header formatting, and removal of unneeded commented out stuff and repetitive loops