Slight code consolidation