Updated DBQuery's commenting and pin locking.

Improved comments, implemented a way to see if user has previously
viewed pin.