Some small changes so that unit tests can use chai explicitly
while other code does not use it by default.