Refactor tools and generator for better skeleton.json parsing