Remove futile imports, fix var refs