Refactoring map api
Refactoring register and profile edit