Updated example 'notes' to use new api and fixed tests.