Add handler function defs.
Refactored websocket interface so we have a regular http interface.