Use pointers instead of putting the whole struct on the stack.