Fix some bugs in Query and SearchController
Refactor subscribe view, improve models and fix several bugs