Moved map functions to seperate module.