Added serialization to the project.

You can now serialise a theme. This fixes #29.