Slightly improved the way we delay encoding to type-specific functions