Fixing example.
Adding tests.