clean up code and fix formating
fix code styling so it passes coffeelint