Added some GUI and key checking.