Use const T& more consistently throughout.