Add .gitignore.
Add some unit tests.