Database upgrade for API v3
Splitting util.go
Upgrading to API version 3