new structure for layer index

I did some small changes to the layers index section.
I have added a new index layer for the common stuff instead.
layers_xx are all using this common index layer.