Improved analyze to better handle ambiguous hints, still needs work