Small Optimization to GetPackets Routine

- Moved grid setup functions out of GetPacket sub.