Namespace generation - complete
Todo: log and logfactory declarations, log rewrites...