Fred - Cleaned up duplicate code