Some cleanup.
Rename d/ to peer/
Use a parameterized query.