Converted the odd double spaces into 4 space tabs
Prevented case where no window was set when waiting for events.
Added two more navigator states (that might be implemented) for BlackBerry
Added keyboard states for BlackBerry