Fixed tests
Added some clarifying javadoc