Makes 'db' argument to connection optional.
Merge pull request #737 from wcdolphin/master

Make 'db' argument to connection optional