Cleaned up main gday loops