Refactored top-level function calls.