Sorted search using pg, tidied homepage