Fixed merge mistakes. Still failing unit tests.