Refactored head and foot generators