Added some utilities and a simple test class with main just to run tests