Moved all serializing code relevant to the serializer into serialize and unserialize Messages methodes.
added a couple tests and verbosed the getSerializer() method