All tests passing though very messy