Updated Router to work with extensions.