Refactor peer settings, fix ptree tests, add peer test.
go fmt