Splitting db.go into main.go, error.go and wrapper.go.