Added code for class routing.