updated JavaDoc, code formatting; also updated unit tests to reflect recent changes