New MySQL saving system

Improved a MySQL saving system to provide better optimised plugin and to avoid crashes on map changing