Final polish. Added index updating