Moved test dependencies around and fixed tests