Rearranging

Rearranging into Function "do" and "if __name__ == "__main__":" ready
for additional functionality