Format and clean up code
Merge pull request #71 from tanraya/master

Format and clean up code