Update to styles to bring more closely in line with the PSR coding styles.

Also fixes a few places that referred to the old config file instead of the the new settings.
Actually have free and close in the database mock perform some memory cleanup.