minor refactoring of Gson related classes