Added __name__ == '__main__' test code.