optimize tarray read access further and do some cleanup