Form to_json added. Fixed bugs with nested groups naming