code tidy, correct javadoc