Test updates and a couple of bugfixes