Added some boilerplate code for layer drawing.