Adding updated version of indexselect, insert, scanselect, and select; indexselect is not done