much increase integration speed

getting rid of clumsy code makes the integration much faster