Refactor octomanage to use a class.