Added an instance getter.
Added common definition for proxies.
Added event handlers and support for logging.