Keyboard input stuff + small fixes