Separated the classes into separate files to improve understanding

Separated the classes into separate files to improve understanding