Rewrite

Near-complete codebase rewrite. Also includes your Litreview PR for some reason - you might not have merged that?
Apache Commons has a Pair<L,R> class, can we think about extending it or something?