free() the malloc()d things and change license to 3-clause BSD