Fixing tests and some other things...