I should really commit more often... (1) Did a lot of cleaning up, added comments, fixed the indentation, removed redundant printing. (2) Removed the hard-coded elements, now the torrent file comes from the command line and my Peer ID is randomized every time. (3) Added trigger for bitfield updating when getting Have messages - this was huge and made the program work much more efficiently and with no hiccups.