Mapping logic between model and views