Refactored the addDatabaseInfo method