Refactoring/cleanup of compute and db apis

Refactor some db calls and remove unused code.

Change-Id: I49466f7ab54dd6dbf0fc78bab3d2df44392ba3ee