Clean up my C code, add cwd to files

Did I mention that I don’t really know C? Ha