Move epoch processing to new file