Added memory protection to prevent mismatching of mem_d or vec_free on pointers which are otherwise unknown to be allocated memory or allocated vectors. Also fixed the preprocessor to only strip on ' ' and '\t' around macros.