Revision of the index page:
- pass template properties according to conventions
- streamline boolean expressions
- fix UI, show purge button and its explanation when the actual form is generated
- make sql portable and bring it inline
- better exploit api