Some refactoring and WIP for slave table for database details.