Remove whitespace, clean up code and fix bug.
Merge pull request #13 from skorokithakis/master

Remove whitespace, clean up code and fix bug.