Do not create directory for just one file.
Remove unused declaration.
Add missing include.
Add support for rule 18-7-1.