Remove redundant db calls.