Fix bugs in message controller. Fix bugs in engine. Fix scripts
compiling. Add websocket tests.