Rewritten addCustomAttribute method. A lot of changes. Added template of script. End of working week.