Implemented and tested index limits on data_mem for controls.