General test improvements