Tweaks to run with Jython2.7.