Seperated the scripts for drawing on the canvases. Added and enforced a minimum and maximum number of layers.