updated docs. refactored more code.
fsm now batches, and calculates stuff every 1 second so that sending is faster
Performance tweaks and better error handling

Send batch size at a time, or if no change in buffer_ttl send remaining