refactored code into three smaller modules
fixup! 2ff072dfe561f330435402029f7faafb1e890462
broke down create_key utility function into parts
implemented basic nose tests