Drastically simplify the hint insertion logic