Initial DiffieHellman code

Started work on refactoring Diffie-Hellman code.