index: simplified code and removed excessive logging