Add pry to test group.
Refactor to one replace function.