compose dest path from category restructured
some further refactoring