Use global tag map instead of one per layer
Save layer information on object
Move `register` and `unregister` to layer
Add id to inner behavior function