Image Paste: Refactorings and last path support