Fix formatting, spaces vs. tabs, and add sections to headers