Organize and label hook callbacks.
Reinitialize rewrite rules after `switch_to_blog()`.

The rules are not switched, so calling `flush_rewrite_rules()` after `switch_to_blog()` will update the new blog's rules using the permalink options from the calling blog, unless `$wp_rewrite->init()` is called first.