Remove url structure from middleware; All tests pass [MJ-212]