a few more warnings fixed, changed key codes into a global object called keys.