Fixing tests (updating to API changes, fix bad merge)