remove unused var
removing unused code and imports
fixing tests so they will throw the real failure instead of blocking