Fixed main file for simplified debugging

No longer segfaults when stuff breaks