various optimization, mainly removing unused Json items