Fixing drawing code and added clear button