refactored

cleaned up loggers, added more comments, and lined-up curly braces with each other