Databases callback refactor