Added defines for packet buffer and rate limiter, added new function used by rate limiter
Minor changes
Implemented rate limiter, packet recovery, packet buffer, several other changes