Added a clear function that empties the shapes array so that the Clear Canvas button works.