Add operator class and tests

This PR depends on #5 before it can be merged.

Also, the tests won't pass until the entity PR is merged.
If any functions this function calls can throw an exception, this should have a @throws note on it (only time you wouldn't include the @throws is if this function is catching all exceptions).