fix merge conflicts, make some jshint changes