Simplify standalone code.

- Only split once
- Don't join what is already there
- Clarify logic