How layers work