04nunhucks,
Out of all the external scripts that you posted i do not see '$LSD\prep.kix', my guess is that it has not been converted to a function and then added to the main script.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)