huge refactoring, moving to new style of maps