Huge layout changes and queries script
Queries updated