Removed lib_tom.
Updated to suit new location of lib and for new checkArgs function.
Latest changes.