added get_pid, some pep8 cleanup
merged pid