Improved support for script classes