Cut down on repeated code in controllers