Optimizations in the library and javalib