FIXUP: Put vars into proper scope, ouch.