Lots of cleanup and beginnings of JSDoc3 support