Fix errors to conform to the protocol better, and add notification support