Added map API and some debug stuff

Map API is currently not working. middleclass isn't working as (I)
expected and I don't know why.