Refactored key combination code into seperate file