Added Javadoc and improved naming of classes and methods