[fix] Assign them in the correct location
[fix] Ensure that we pass in the layer reference
[fix] Reset the index so we can iterate over all layers.
[test] 100% coverage