Code cutdown in controllers