Refactored/enabled database update functions