Renamed path leaf method.
Fixed VC++ warnings.