Refactored drawHeader