Fixed segfault errors, now on to rendering