Broke out a save function for readability. Fixed a bug that could cause region monitoring to break.