lots of minor bug fixes - prior to looking into excel export bug