Key Command update

Add a keyboard command for New Window, tidy up code a little bit