Cleaning up tests and fixing dependencies