Pooled mysql connection and implemented better callback pattern