clang fix for some template mess.
Clang seems to dislike some *this syntax, so fix and ifdef out some code that most likely isn't needed anymore
clang fix for narrowing