Finish hint implementation with tests