Refactoring DataSourceFactory