Segfault fixed, writes vertices to obj