Moved types.js convert() into exports
ProtocolError takes a FrameParser
Filled in prepare and execute functions
Added EVENT handling and a few callbacks