Created most of the window to freely query the database