Fixed code inconsistencies with Javadoc, code structure and whitespace.