Added some defines to reduce code size, now it frees pointers after use (at last! hahaha), still doesn't work properly