Refactored map to be a view