Code organisation, add readme

Added a readme and done some code comments for the project.