I was so close to leaking no globals :(