code cleanup: semantic and index of input out of Indices.