Refactoring/cleanup of compute and db apis

Refactor db call usage and remove some unused code.

Change-Id: I49466f7ab54dd6dbf0fc78bab3d2df44392ba3ee