refactoring to reduce Interfaces class size and correct some pep8/flake8 warnings