Add .gitignore file.
Refactor data types and interface.
Code to write out a key.