refactoring mouse/key states into headers