Clean up and static types.
More efficient indexing.