Thread now created within loop
Removed obsolete reference to MasterAllocation table
Added support for MariaDB
Added support for MariaDB