Adding support for model listeners and adding missing tests.