Move code to toplevel. (HACK)