port iterate_scans and split into iterate_scans and bind_layer. references #29