Changes to make tests run with Karma