Refactor shell to work with new Gremlin