Test code moved to __name__ == 'main'