re-work all files to more C-like conventions