move connect middleware and browserify to separate modules