haskell: Wrote rest of script load function