Fixed syntax errors, got it compiling!
Added a function for clean termination of autoExec