Changed to using new JaVer API, removed most workarounds