Merged #66. with a few updates (styling, version, javadoc, etc)
Fixed javadoc warnings
Added null check; #66