Much refactored
Merge pull request #4 from mrredr/master

Much refactored