Refactor Gremlin