Adds gender to patient
General cleanup, refinement of preview stuff.