Made import of tkinter dependent on whether __name__ == '__main__'