Refactor methods to run under any MonadIO monad for easier re-use.