get pid...

tests cleanup better, and some pep 8