Added lightweight vec2d struct and Memory macros