Huge clean up, make tests pass again