Layers refactoring