WIP - refactoring to switch database in static
CONFLICTS FIXED