Added header for keygen
Disabled test code
Cleaned up code for consistency, removed debugging
Added new source files
Cleaned up new tests
Minor refactor