fix compile errors, add fragmentindexer functionality
still need to test