Remove unused variables. Remove tron() call which would cause apps to get into debug mode on exception. Various PEP 8 fixes.