added first parts of ScriptSystem, random fixes for it