Add concept of phases for a study

Predefined phases of the study can now be worked through. Each phase is
marked with an event.

Also the layout of the study page has been changed to be more concise.