create abstract destination, remove duplicate code
Merge branch 'local'