Added possibility to cancel action by pressing ESC (solves #3).