Tests working so far. And fixes as well.