Improved mysql database management and merged contact with accounts