Tweaked to deal with taxonomy at the root level. We'll need to think about how we filter out css, js etc..