tests: code clean up