Major overhaul to Test File format and other internals