Fixes to demo and server projects.

- Also generalized local binary operations.