fixing some more jshint indentation errors and an undefined var