refactored and renamed main gz.sh and gz.rb