Hoisted some functions to the top level so I can profile them.
Hoisted some functions to the top level so I can profile them.

--HG--
branch : monad-stack

erochest/bakers12,erochest/bakers12,erochest/bakers12