Using generics for target class in routing.