Move test stuff back to toplevel