Updated style classes with regex type and fixed minor bugs
Refactored to allow for id to be only set once