Add command support

Add a keyboard command for New Window, tidy up code a little bit
Merge pull request #67 from joemarini/master

Key Command update