Updated javadoc, renamed fields where necessary.