Further failure to free on error repaired and start of AFL testing code added.