Refactored HintsTransform for performance when creating html items