Warning cleanup

Hi,

there were some warnings during compilation, so I fixed them. I also made two minor changes:

  * added ```.gitignore``` file to ignore cabal's build directory
  * added ```-Wall -O2``` flags in the ```.cabal``` file

Finally, I made one huge change: I changed tabs in the source code to spaces. I don't know whether you consider this acceptable or necessary. Just in case you want to discard detabifying I made each of my changes in a separate commit so you can cherry-pick them.