Added keeping layer order while replacing views to layers
Added delegate wrapper