HOOK_QUERY_HEADLINE - updated for your issues

Fox, implified the code per your comment.  Here is the revised code for the HOOK_QUERY_HEADLINES