Redid backend to write queries in mergerTree.html
Updated other fixes