Removed debug printing.
Restored normal functionality to main().