Refactored alot and changed the structure of the files.