Modified namespace extraction.

Modified it to use the namespace cment if exist, otherwise it uses the
old method.