Reorganized files, tidied code and added a readme.