Add dev files to .gitignore
New test for Pid. Minor refactoring