[build] fix index lib
[cleanup] unused code purged