Added clear button and functionality. Could use some cleaning up, but it works.