Re-ordering namespaces and renaming functions