Refactor main func
Allow choosing package destination