Added initialization and validation of datasource fields.