Moved index drop out to another file.

* This should actually detect necessity now.

Change-Id: Id625c363c3b79cfc7e5917e0fbecb8d44b6859ba