Added ability to register handlers async.
Removed unnecessary gateway abstraction.