Add -g and -O2 to CFLAGS
Fix leaked subnodes array