Cleaned up the class, and javadoced