Refactor status_controller