Refactor Orders controller