Moved serialization code into lookup class. Updated documentation.