make vars local to methods using them, change bad var name