Use auto in for statements, fix const in SetListened
Use more auto in for statements