Transform: move srcBounds out of the main loops
Transform: move generic functionality out of the plugin code