Replacing DB code erroneously removed from master.