Removed close connection function