New index file more work on main buffer

Incomplete