Adding optimize and refactoring index model namespaces