App

Rewrite of application module, new keychain, new keygen. Refactor other code to work with new app.