More undefined vars after refactor