Added a cleanup function to delete temporary files when the script is done.
Changed variable prefixes from '$' to 'id_'.
Added closing parenthesis to 'do' syntax.
Changed 'stringtype' syntax to use single quotes instead of double quotes.
Added a predicate to print the call stack, and changed the 'to implement' message to a string recognisable in Prolog.