tweaked key handling and more