Major update of what is still a major hack

Layed out the basic class structure for Chestnut, and made sure creating
template gems is easy. Lo and behold it basically still seems to work.