Started temporal implementation. only set up segments and state vectors plus
the beginning of stage 1, calculating the active states of cells.