Moving peer-to-peer stuff into a separate, abstracted file.