Maybe add an attribute to the scrips where we say the class name and then when adding scripts check if the name already exists?