Refactor stage 3. Also adds basic responsive code to map.