Cleaned and fixed tests