Minor tweaks, maintenance improvements and tidier externs

- YUIDoc path improvements
- Generate tidier extern code
- General cleanup/maintenance

You might want to grab andyli's changes from his fork first for a nice complete package.