Written a few more functions in the refactored version. Need to look at writing some unit tests to check these all work as expected, integration to existing code will be fun.