minor edits to code and java documentation