Fix header format and add file end marker

This makes the file valid for package.el.  This commit also includes
some trailing whitespace cleanups.