Refactor using respond_with