Properly arrange the rows again.

The styles that were applied to the different rows are now applied
dynamically. This way we can easily support more phases later on.