Improved test mapper, fixed spurious mapping bug