Rewrote the hint parsing logic