changed mysql class and small updates