Added Tom's code.

Dem file structures.