Remove some unnecessary database calls.