Use pointers to structures instead of direct references to save size and increase speed