Restructured UFO test code