WIP some layer logic moved