Improved and fixed some tests.