Refactor operations into a package.