Reduce packet size

Send many smaller packets instead of one large one.
Credit for this goes to @jeffsilverman-1958
Fixes #1