Fix a PHP 5.4-ism
Advanced mode - all the actually-used variables from core.

Also sneaks in the beginnings of a preview. I wasn't thinking linearly.