DB config and cleanup