Addressed code feedback and fixed flake8 code convention issue.