- Made style improvements based in dscanner's --styleCheck.
- Replaced some passed-by-reference parameters with ref parameters.
- Put db_* functions into DB class.
- Marked some more functions as pure/@safe/nothrow.