refactor logic of keywords into a view-based model.