Begin removing query and adjust namespaces