Updated to express 4. Updated middleware to support express 4