refactor map controller with map services