Remove blank lines and put internal links