Made use strict, various jshint fixes