Bug fix and fix templates system

1. Many bug fixes
2. Add test for operator and new syntax for Where
3. Get the Templates system fully working.
4. Pass all the variable into Datas and slot placeholder in query
instead.