Put Mousetrap module back into wrapper function

This removes the assumption that Mousetrap has created a global variable.