refactored to have better code separation
Merge branch 'master' of https://github.com/rtjoseph11/nTorrent