removed pointless class, refactored a bit and added some javadoc