Remove unused code and fix an API call