Parse options.
Options and state
Several protocol improvements and bugfixes