Fixup SEGV and layout error

.. minor fixups for new CP model code to initialise
   some vars to NULL and remove Qt runtime warnings
   about layouts.