Remove needless function calls