Fixed up merge problems and naming so that tests pass.