Added java doc and cleaned up code