Merge pull request #1 from h-taylor/master

New file structure and some refactoring