Tests updated. Added macro for freeing structure.