Javadocs and some minor changes