Minor changes

Removed a comment.
Added the if __name__ .... bit.
Changed a sys.exit(1) to raise an exception instead.