Some plugin generation fixes.

- Ensure empty lines in some places
- Only print the table if we actually have items to put in there
- Always use inspect function when printing out the defaults

Fixes #2045
Update templates

- Fix empty lines
- Add some more text

Fixes #2045