added clearButton and fixes