Refactored datasource chain