Fixed a crash, moved route related code to g_route.c