better build script and some javadoc