Added tests.
Updated gitignore.