Moved the app code into a class so it will be easier to test
Merge pull request #2 from ollie/master

Moved the app code into a class so it will be easier to test