Merge Module branch into Master

Now that mnml-db works as a module in this branch, we can now proceed to merge the changes into the master branch. We also have separated classes into separate files in order to have better organisation. 

These changes have all been tested so the merge should go smoothly.