Use the ClangT monad to clean up the indexing code