Updated content type inferring. Fixed test