Numerous changes

Changed the project structure, fixed bugs and updated readme.