added cabal for automating builds; fixed bug in server