test: Clean up code a bit