Added serializability and a class to export example programs.