Added functions to allow program to work without DB connection.