Added NPM support and better port use for OSX