Remove unneeded function calls