Removing some unwanted function calls