Reduce code complexity in ENLIssue and fix all pep8 violations