Removing dependency on db