I have fixed some bugs and cleaned up the code a lot. Also renamed some files for better identifiing