Solved issue #1 - added escape key functionallity