API changes, fixing unit tests