Essex company in court after massive chemical spill