Removed middleman code that will fail everywhere else, added tests.