smurf: Fix various memory leaks
kaplibs: Fix memory leak
smurf: Correct checking of smurf history

The whole issue of only checking the supplied "appl" characters seems to
have been lost somewhere along the way. This commit re-instates it.

Antonio was using REMSKY followed by EXTINCTION, but EXTINCTION was
complaining that REMSKY had not been run.