major rework of the layers model into polymorphic models