fix namespaced models, fix multi-index search and add tests