Refactored argument passing