Moved methods to related classes, added some javadoc comments, changed
some class and variable names with proper ones.