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