Update to Traits-based model, add tests