Fixed "expires:" header format error.

Added “dateformat” package. Plus some code reorganization.