SymbolDatabase: Several small refactorizations