Removed _embeddedTypes in favour of class methods.

Also began adding test cases for the protocol code.