Added factory for producing Gson object.
Injected Gson object.