Json generation cleanup