Fixed all newly failing tests (1 failing, 1 pending as before)

Made map view functions cleaner