Removed an unnecessary call and modularized the keypress callback.