Add some model helpers and tests.