Rough cut for a 0.4.0 release candidate. Implement event emitter and changed usage for startup and shutdown greatly.