Name reference fix, compile warnings fixes.