js: only hide sections which aren't used
some tidying