Registering classes according to a dependency rank