Finalizing db storage stuff