Code cleanup, mostly headers and spacing, see #16 and see #1.