Some changes to avoid classloader nightmares.