Added Javadocs for controller package and cleaned up source