Changed the layout of MzFigure an corrected a few bugs.