clean and format

general cleaning and formatting for readability
finished formatting