Split Cabal package into three separate packages and reorganize sources