added cabal. some directory reorg. some fixes to make it all compile