fix numerous compiler warnings/errors on clang
fix an errant assert at startup
fix a few clang-related things