use https, refactor & jshint