Javadocs and cleanup