tests and clean up