Fix more namespacing and fix late hook setup.