Moved tests to other source files, improved cabal file.