Merge "Simplify router stub registration and unregistration" into main