Fix memory allocation and add unit tests
Add missing version to javadoc plugin