Nortel , which is based in Brampton , Ontario , only recently sorted out its books after revelations of improper accounting that led to the firing of many executives , including the chief executive , Frank Dunn , in April 2004 .