Fix option class

If an option didn't have a class, "undefined" was being added as a
class. The variable optionClass was created to fix this.