cleanup and remove sloppiness, ensure both gcc and clang work