Build clear history and generating hint functionality