Extend split tool, fix encoding issues with special characters.
Fix encoding and start truncating references.