Added soft em algorithm
Changed resizing of trace matrices