Javadoc update plus code optimization