removed unnecessary code
proper initializing of variables
using Google Gson for serialization from Java objects to JSON objects