Fix uninitialized variables
Check for allocation failures
Don't use FreeAll or we free twice
Make Get/Property functions more readable and fix possible dereference
Fix possible bad memory access