Added hash patch feature, tests