Fix engine swap of width/height
Move preview dims into protocol
Remove unnecessary allocation of engine at startup
Add command-line interface to engine