Made some of the SQL statements easier to read