Improvements to hint generation