Changed keyboard remapping from direct method call to triggered event
Rearranged and refactored code; added documentation