Comments and added javadocs.