Got compilation working with clang.
Implemented serialisation.