Add a couple of type signatures. Apparently GHC 7.8 can't figure them out anymore