Refactored function argument orders a bit so they're more consistent