cleaning up server/pcosserver
JSON support
Register terminal