Restyle to Allman
Split into classes and methods
Changed file permissions