Better use of packages

Separated the source files from the class files and improved separation
of concerns in the code