rewrite source retrieval
unify local archive unpacking
delete main_test.go (moved to retrieve_test.go)