Fixed some deprecation warning

According to https://github.com/senchalabs/connect/wiki/Connect-3.0
Merge pull request #44 from kabbi/fix-remove-deprecations

Fixed some deprecation warnings