Major Commit 2

Config, organisation and bug fixes, mysql database api started