add comments to save.py
removed global location in favor of return location
fix bug where prev_loc wasn't being updated