Improve database debugging, remove notices.