Tidied if __name__ == '__main__'