database objects refactored