Refactoring of sqlite C++ wrapper