Refactor the gravatar url building process