Refactor: move typedefs into Types.hs