Rewrite succesful, tests still failing.