Resolve variable name issues per PEP8 Move all logic under `if __name__ == "__main__"` to a `main(..)` function. The purpose of this is to not only address flake8/pylint reported issues with variable names, but also to enable testing of the function in isolation to ensure the logic acts as desired. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>