Removed unused code from script engine