Engine refactor

pulling into dev branch instead of main one (being a good software engineer - pretty sure there's no way to edit requests once they've been made ( https://github.com/increpare/PuzzleScript/pull/77 being your original one) , so making a new one).  I hope it's going in the correct direction...