Fixed a bug in main().  Converted tabs to spaces and removed trailing whitespace.