Refactored for Express 4.x.