Connection: add new functions an refaktor some details. Not finish jet.