Well, this section definitely need to be cleaned up a LOT. But ultimately I envision a registration API, where the wallet can operate entirely as a service with absolutely none of its own UI code. Apps that make use of it could then query it for status, ask it to send transactions, and subscribe callback handlers to be alerted when things happen.