Fix http api tests with missing promises
Fix global leak in InteractionMachine revealed by the now fixed http api tests