Refactored things and consolodated the getting of class names.