C Formatting

Plus some small changes to scripts.