Updated some code for GHC 7.