Empty lines in header, how to remove them

The blank lines are probably being generated by code that is hooked to the wp_head action. Generally speaking this is not a big deal as it won’t affect the way your page is displayed in a browser. There are some downsides like the size of the HTML document that is transmitted, but this can be solved by using gzip. If you want to remove all the whitespace so that it never makes it to the rendering engine in the browser you can use a plugin that supports minification like W3 Total Cache.

The WordPress version in a meta tag isn’t really a security issue because there are other ways to tell what you are running. Security by obscurity is discouraged because it isn’t really security. Some plugins like WordFence do give you the option to remove it however.

Worth mentioning that you can do all of the above yourself as well if you feel up to it using the action/filter hooks provided in WordPress.