Can we document what this little block is doing? something like `# Clean up some corner cases on the last line of the file` or something.