More removal of casual globals

Signed-off-by: Ben Agricola <bagricola@squiz.co.uk>