Moved json parsing away from commenting logic