Added methods for searching of config files in database. Tests refactored.