Was still referencing 3 globals directly.