Cleaned up main() - Gary