Placed more code into Internal.hs