Refactor function calls.