Connection optimization. Class re-factored.