Add a .gitignore file.
Clean up and fix failing tests.