Refactor datasource configuration