Modified ctrls.py, query.py