Improved script for creating components.