Added some JavaDoc and other comments