Decoupled core library from indexgen command line tool