three-quarters of overhaul done, added packet/keybind handling