Lots of untested refactoring
More refactoring
Some bug fixes and additional unit tests
Refactor interface to RePair