Removed protection from mg_write(). Refactored mg_iterate_over_connections()