Added some DB code.