cs.json_encode() and cs.json_encode() wrappers removed.
Some simplification in connected parts of code.