API changes & misc cleanup