Switch class/cssID template assignment

By this change it fixes an issue which occurs when assigning module data to the template by reference.