g XXX check mallocs and frees. lots of leaks. check ebeedictget for strings. perhaps add check to make sure there are no \0's in the data. maximum number of connected peers (Maxdialedpeers, Maxpeers) trackrequest more often when no peers. listening doesn't seem to be working? probably also the thing that breaks uploading. and we don't seem to make it to the peerlist in the tracker. do filewriting/filereading in separate procs? profile and see what is most expensive. read paper/docs to refine piece scheduling. mostly, make sure we get first and last pieces fast. in between we can do one piece per peer and punish them for giving bad data. introduce variables for the algorithm. Snubtime, etc. somehow send "stopped" to tracker? without annoying user like python client does. design: perhaps only fully initialize piece structure when it is active, i.e. being requested. perhaps not worth the memory saving. would cause lots of changes.