Small refactoring to move operation definition into a trait