Build passes OSX/clang, remove traces of globals