Added KeyManager and key mapping mechanics. Also restructured the packages