Updated structured of the project.

Classes have been subdivided in their corresponding own files. Other
changes have been made to improve the structure.