Added runtime error (does not stop script) for use of undefined vars.
Added minor optimizations
Added variable type declarations in foreach. Fixed slices in foreach. Readded 'as' keyword.
Port shell task runner to bukkit code