refactors character class and subclass