Cleaning up setup.py, moved main function to inside module