enable downloads from multiple peers
remove whitespace
refactor helper function names