add new line at end of file
big clean up and comments added