Refactor operations to a separate package.