Merge pull request #537 from bherila/xmlrepository

Fixes to xmlrepository
Changed Links and Image migrations to check applicability faster
Merge branch 'master' into xmlrepository
Further optimize migrations