Refactor main.py
Merge pull request #105 from nhandler/nhandler-refactor

Refactor main.py