Cleaned up SQL.