A couple more fixes in the layout plus edited some queries