Fixing tests and removing obsolete