Space code more readably in transform.
Minor fixes

- Use absolute imports so __main__ examples work
- PEP8: 2 blank lines