Remove useless function calls