Fixed almost 2-year old screw-up.
Refactoring ScriptManager
Still refactoring ScrriptManager. A little tighter code.
Reformatting and documenting ScriptManager.