fixed some bugs, added max-age header and gzip feature