Remove trailing spaces
Add rework.inline to encode images to base64
refactor