Removing peer header
Fixed portability issues