Major changes.  Split various scripts and make all variables local.
All prepared for main coding