Added "index" reference types and changed basic dex implementation to use it.