A lot of restructuring. Using VarEvents, SOAP connection.

Most of the changes in this revision are to use the VarEvents library
instead of proprietary events system. The SOAP interface was also
included for notifications form the controller.