Refactor into models, views, and observers (watchers)