Thanks for the suggestions, I'll try to expand the test case with the tougher variations and refine the way we cast off our dependencies.