Cleaned and polished. I also added some lines to peer listener such that it will not accept pieces anymore if the file is complete.