added end date check to spaw
fixed jshint errors