Cleaned up code.
Merge pull request #1 from dajoh/master

Cleaned up code