Modified the template class so that it roots all selector queries and
added a few more use cases