clean and improve tests