Added map commands and saving function