A lot of changes to setup running tests correctly