Add db stuff. WIP.