Add function visibility; Fix gzip encoding