Remove dead code.
Fix specs on jruby.
Change table orientation handling.