tests: code cleanup