remove empty lines, fix up meta section