fixed trace
some code cleanup in MySQL class