added tests, added comments to a few files to adhere to javadoc standards