Moved map functions into map object.
Created a map reset function.