Add close connection & optimize code
Optimize Database Connection use