Add period cell states for styling purposes

Add first, middle, and last period states so the cells can be styled differently. This only affects S-Period mode.