Fix doc comment
Rename variable to reduce confusion
Fix cookie name if the DB name contains dot