Removing unused code
Use connect middleware