Move layer functionality to GeneralLayerCommon in epd-common