Single file heading

Needs a little more work. Fixes #361.