Some changes to the Layer functionality