Improved test setup