cleanup and correct tests