replaced deprecated functions with modern counterparts
fixed regex bug in get_heading_hints
fix deprecation warnings