Added a (runtime) variable manager and event handling for scripts