Basic logic for the layer base class