Some minor problem pinpointed by pychecker, unused import, params etc.