adding unit tests, javadoc to knock out todos