Added scripting for components and fixed CRAFTERCMS-263