support for express 4.*

Fixed some issues and upgraded to node.js express framework 4.*