Ensuring that index resources are released
Removed not used imports