MoL.m: Use DefFn for all function definitions
Add Stack.m

This source file comes from SimulationTools
KrancThorn.m: Use DefFn for all function definitions
Errors.m: Improve formatting of "invalid arguments" error message
Errors.m: Add CatchKrancError
Errors.m: Display a stack backtrace when reporting errors with CatchKrancError
CodeGenCalculation.m: Use DefFn for all function definitions
Errors.m: Change recommended use of ThrowError

Recommend that the caller provides a single string with the error message.  For backward compatibility, multiple arguments will be converted to strings in InputForm and displayed one per line.  This will avoid 2D ASCII output being used for error messages.
Update some calls to ThrowError to pass a single string
CodeGenCalculation.m: Improve error message for "unknown symbol in calculation"
RunKranc.m: Tidy up exception handling
CodeGen: Introduce a facility for performing checks earlier

This means that errors should be caught before bad results are returned, rather than when they are passed to other functions. It should make it much easier to debug problems.
CodeGen.m: Remove unused AddToFile function
Remove unused function PartitionVarList
CodeGen.m: Remove unused functions
Add CodeGen test file
Kranc.mt: Catch errors
Errors.m: Add function-call counting and an option to enable or disable the backtrace

Currently the backtrace code introduces a performance penalty
CodeGen.m: Remove DefFn from some functions

These are called very frequently and using DefFn for them leads to a
performance penalty.
McLachlan.mt: Add CatchKrancError to all tests