adding test classes, and making style edits in Java code