Begin adding valid peer and master checking… partial

Not yet completed, but done in a way to pass so the code works.