MySQLi refactor done