Added proper __main__ based on bd808's suggestion