Fixing gvertices and writing tests