refactor, split to modules, change error handling, fix how default destination
is specified