Fixed map scroll issue, cleaned code a bit