Fix: F841 local variable 'e' is assigned to but never used Also, fix other problems found by hacking in these files. Change-Id: Ib6eaf27c8e6f1414acc9dbde41a35bd412b7161e