fix tests, simplify loader