Fix some clang warnings in native

also cleans up a bit