Fixed a negotiation bug, started work on debugger