mouse handling, window title
added escape key handling and conditional compilation