Add set options function

Also add missing docblock for db