massive datasource rewrites + optimization