Fixed weird replacement issues for BOT_NAME, and seriously abstracted save_changing_variables into two nested for-loops