Migration to mysqldump

Lots of changes to the structure & working