Fix everything in main.c
Fix some memleaks in create.c and main.c