Fixed the epoch system.

Most of this work is from last night.