Some more refactoring, to get rid of old API references