made the Lexicon Serializable
added a test case to ensure serialization