Added some database tweaks