Added __main__ and the shenanigans to make it work.