Added javadoc to entity and some other minor changes.