Fixing & generating JSON for user