add comments, fix
add tests
(cherry picked from commit af40306)
fix contrast summary tests by returning factor header not factor type