show only impact layer in legend as in previous InaSAFE versions
also handle case when impact layer not in the top of TOC
fix pep8 issues