Cleanups, fixed for batch indexing