massive refactor, dropped 9.3 support, improved test suite