Upgrade code. Add support for jruby