replaceLast and some replaceFirst fixes

replaceLast impl and doc unittests

quickfur fixes

david nadlinger whitespace fix