Updated form to allow user to generate a query. Also formatting fixes.