Change to new Thermex API and organize module imports.