Improve features / tests code

An improvement to our test code. I could only think of this one though, so if you know more stuff to fix, I'll be happy to do so. Otherwise this is ready to merge.