Improved java types implementation.