Cached more queries, used safe QSqlQuery pattern