Working on indexer and scanner. needs testing.