refactored view to dom mapping