Refactored stringifier and equaler