Refactor with partial view