Implement Serializable in temporal classes.

Resolves #4