fix openmp bug, other tweaks and fixes
drop C89 - for now