Getting rid of dirty hack to access map
Some renamings to conform better to our conventions