Updates to map api, more maps refactoring