Cleaning up some deprecated API