Implemented cancel button functionality.
Merged with origin/master.
Implemented cancel and clear button functionality.