Add factory methods for operations.

You should use them to create operations.
This allows me to change the representation without breaking your code.